home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4294 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: news.mindlink.net!news
  2. From: genew@mindlink.bc.ca (Gene Wirchenko)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Basic Question on SWITCH
  5. Date: Sat, 03 Feb 1996 06:50:18 GMT
  6. Organization: MIND LINK! - British Columbia, Canada
  7. Message-ID: <4ev0n0$jeq@fountain.mindlink.net>
  8. References: <4e8p6m$n8q@ns.RezoNet.NET> <TANMOY.96Jan26162346@qcd.lanl.gov> <4ehfuj$166g@ns.RezoNet.NET> <DM5qor.9G1@eskimo.com>
  9. NNTP-Posting-Host: line070.nwm.mindlink.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. scs@eskimo.com (Steve Summit) wrote:
  13.  
  14. [snipped previous writers - ah, the joys of editing!]
  15.  
  16. >Actually, it turns out that there *is* a guarantee that the
  17. >digits are consecutive, and it's in about the highest authority
  18. >possible: the ANSI/ISO Standard (section 2.2.1 in the old ANSI
  19. >version).  It's true that you rarely need to make use of this
  20. >guarantee when testing for digits, because isdigit() is usually a
  21. >better choice, but it makes it *much* easier to write anything
  22. >that has to convert number strings to numbers (a la atoi),
  23. >because there isn't a standard ctod() or digit_weight() function.
  24.  
  25. >(What's true is that the *letters* aren't guaranteed to be
  26. >consecutive, as they aren't in EBCDIC.  So be careful when you're
  27. >writing strtol, although for A-F I think you're safe in EBCDIC,
  28. >too.)
  29.  
  30.      You are.  A-I, J-R, and S-Z are consecutive ranges in EBCDIC.
  31. Why groups of 9?  Punch card codes.  I remember punch cards: they came
  32. in between the dinosaurs and the mammals <G>.
  33.  
  34. >                    Steve Summit
  35. >                    scs@eskimo.com
  36.  
  37. Sincerely,
  38.  
  39. Gene Wirchenko
  40.  
  41. C Pronunciation Guide:
  42.      y=x++;     "wye equals ex plus plus semicolon"
  43.      x=x++;     "ex equals ex doublecross semicolon"
  44.  
  45.